﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HuaHan.WorkTicket.Domain
{
    [Table("tblMenu")]
    public partial class Menu:BaseEntity
    {
        public Menu()
        {
            this.GroupRole = new HashSet<GroupRole>();
        }
        
        [Key]
        public System.Guid MenuID { get; set; }

        public System.Guid ParentMenuID { get; set; }


        [Required]
        [MaxLength(20)]
        [DisplayName("菜单名称")]
        public string Name { get; set; }


        [MaxLength(20)]
        [DisplayName("Action")]
        public string Action { get; set; }


        [MaxLength(20)]
        [DisplayName("Controller")]
        public string Controller { get; set; }


        [MaxLength(30)]
        [DisplayName("图标")]
        public string Ico { get; set; }


        [Required]
        [DisplayName("显示顺序")]
        public short SortOrder { get; set; }


        [MaxLength(100)]
        [DisplayName("描述")]
        public string Description { get; set; }
        [NotMapped]
        public List<Menu> ChildMenus { get; set; }

        public virtual ICollection<GroupRole> GroupRole { get; set; }

    }
}
